package com.commerce.networkframework;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.commerce.networkframework.activity.HttpURLConnectionActivity;
import com.commerce.networkframework.activity.OkHttpActivity;
import com.commerce.networkframework.activity.VolleyActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void Click(View v){
        Class<?> cls = null;
        switch (v.getId()){
            case R.id.httpurl:
                cls = HttpURLConnectionActivity.class;
                break;
            case R.id.volley:
                cls = VolleyActivity.class;
                break;
            case R.id.okhttp:
                cls = OkHttpActivity.class;
                break;
            case R.id.retrofit:
                break;
        }
        startActivity(new Intent(MainActivity.this,cls));
    }

}